package com.fingard.dsp.bank.directbank.vbao03.trade.utils;

/**
 * @author : lirp Email: lirp@chinavbao.com
 * @version : 1.0
 * @Date : 2015年11月4日 上午10:57:33
 * @Description : 平台支付方式枚举类
 */
public enum TradeCodeEnum {
    SINGLE_DK("1001", "单笔代扣"),
    SINGLE_DF("1101", "单笔代付"),
    SINGLE_QUERY("1002", "单笔代收代付查询"),
    BATCH_DK("2001", "批量代扣"),
    BATCH_DF("2101", "批量代付"),
    BATCH_QUERY("2002", "批量代扣代付查询"),
    BATCH_QUERY_DETAIL("2003", "批量代收代付明细查询"),
    SINGLE_AUTHENTICATION("4001", "单独鉴权"),
    GATE_WAY_PAY("5001", "网银支付"),
    GATE_WAY_PAY_QUERY("5002", "网银支付查询"),
    GATE_WAY_PAY_REFUND("5301", "网银退款"),
    GATE_WAY_PAY_REFUND_QUERY("5302", "网银退款查询"),
    MOBILE_PAY("5003", "手机支付"),
    MOBILE_PAY_QUERY("50021", "手机支付查询"),
    MOBILE_PAY_REFUND("53011", "手机退款"),
    MOBILE_PAY_REFUND_QUERY("53021", "手机退款查询"),
    COMBINED_DK("1003", "组合支付中代收"),
    COMBINED_AUTHENTICATION("4003", "组合支付中鉴权"),
    COMBINED("7001", "组合支付"),
    CHECK("3001", "对账接口"),
    GATEWAY_CHECK("30011", "对账接口"),
    NCL_CHECK("30012", "新华对账接口"),
    ACCOUNT_CHECK("30013", "资金中间对账接口"),
    QRCODE_PAY("8001", "扫码支付"),
    QRCODE_PAY_QUERY("8002", "扫码支付查询"),
    QRCODE_PAY_REFUND("8301", "扫码支付退款"),
    QRCODE_PAY_REFUND_QUERY("8302", "扫码支付退款查询"),
    APP_PAY_REQUEST_NOTIFY("8401", "APP支付交易同步"),
    WAP_PAY("8501", "WAP支付"),
    WAP_PAY_QUERY("8502", "WAP支付查询"),
    WAP_REFUND("8601", "WAP退款"),
    WAP_REFUND_QUERY("8602", "WAP退款查询"),
    WAP_CASHIER("5601", "WAP收银台支付"),
    PC_CASHIER("5501", "PC收银台支付"),
    CASHIER_PAY_QUERY("5502", "收银台支付查询"),
    PUBLICNO_PAY("8003", "公众号支付"),
    VERIFY_CODE_PAY("70011", "微保快捷获取短信验证码"),
    COMBINED_PAY_QUERY("70012", "微保快捷查询"),
    ONEQRCOCE_PAY("8801", "一码付获取二维码"),
    ONEQRCOCE_PAY_QUERY("8802", "一码付支付结果查询"),
    ONEQRCODE_INVALID("8803", "一码付二维码失效"),
    OWNERSHIP_QUERY("71001", "银行卡归属地查询"),
    QUICK_PRE_BINDCARD("41001", "快捷支付-预绑卡"),
    QUICK_CONFIRM_BINDCARD("41002", "快捷支付-确认绑卡"),
    QUICK_PRE_PAYMENT("41003", "快捷支付-预支付"),
    QUICK_CONFIRM_PAYMENT("41004", "快捷支付-确认支付"),
    QUICK_QUERY_PAYMENT("41007", "快捷支付-交易状态查询"),
    QUICK_PRE_PAYMENT_CJ("41008", "快捷支付-预支付"),
    QUICK_CONFIRM_PAYMENT_CJ("41009", "快捷支付-确认支付"),
    QUICK_QUERY_PAYMENT_CJ("41010", "快捷支付-交易查询"),
    DF_REFUND_QUERY("2301", "代付退票查询"),
    GATEWAY_COLOSE("8005", "扫码订单关闭"),
    ;


    private String code;
    private String desc;

    private TradeCodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static com.vbao.service.trade.utils.TradeCodeEnum toEnum(String code) {
        for (com.vbao.service.trade.utils.TradeCodeEnum category : com.vbao.service.trade.utils.TradeCodeEnum.values()) {
            if (category.getCode().equals(code)) {
                return category;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
